const express = require('express');
const router = express.Router();

const photos = [
  {
    name: 'Node.js Logo',
    path: 'http://nodejs.org/images/logos/nodejs-green.png'
  },
  {
    name: 'Ryan Speaking',
    path: 'http://nodejs.org/images/ryan-speaker.jpg'
  }
];

router.get('/', function (req, res) {
  res.render('photos.ejs', { title: 'Photos', photos });
});

module.exports = router;

module.exports.list = function (req, res) {
  res.render('photos.ejs', { title: 'Photos', photos });
};
